/**
 * piui animation 动画都以 pi-ani开头
 * -------------------------------------------------------------------------------------------------
 */

[class*='pi-ani-'] {
  animation-duration: $pi-animation-duration;
  animation-timing-function: $pi-animation-timing-function;
  animation-fill-mode: both;
}

// 渐入
.pi-ani-fade-show {
  animation-name: fade-show;
}

// 渐出
.pi-ani-fade-hide {
  animation-name: fade-hide;
}

.pi-ani-scale-up {
  animation-name: scale-up;
}

.pi-ani-scale-down {
  animation-name: scale-down;
}

.pi-ani-slide-top-show {
  animation-name: slide-top-show;
}

.pi-ani-slide-top-hide {
  animation-name: slide-top-hide;
}

.pi-ani-slide-bottom-show {
  animation-name: slide-bottom-show;
}

.pi-ani-slide-bottom-hide {
  animation-name: slide-bottom-hide;
}

.pi-ani-slide-left-show {
  animation-name: slide-left-show;
}

.pi-ani-slide-left-hide {
  animation-name: slide-left-hide;
}

.pi-ani-slide-right-show {
  animation-name: slide-right-show;
}

.pi-ani-slide-right-hide {
  animation-name: slide-right-hide;
}

.pi-ani-shake {
  animation-name: shake;
}

.pi-ani-reverse {
  animation-direction: reverse;
}

@keyframes fade-show {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fade-hide {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes scale-up {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scale-down {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.2);
  }
}

@keyframes slide-top-show {
  0% {
    opacity: 0;
    transform: translateY(-100%);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-top-hide {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-100%);
  }
}

@keyframes slide-bottom-show {
  0% {
    opacity: 0;
    transform: translateY(100%);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-bottom-hide {
  0% {
    opacity: 1;
    transform: translateY(0%);
  }

  100% {
    opacity: 0;
    transform: translateY(100%);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  10% {
    transform: translateX(-9px);
  }

  20% {
    transform: translateX(8px);
  }

  30% {
    transform: translateX(-7px);
  }

  40% {
    transform: translateX(6px);
  }

  50% {
    transform: translateX(-5px);
  }

  60% {
    transform: translateX(4px);
  }

  70% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(2px);
  }

  90% {
    transform: translateX(-1px);
  }
}

@keyframes slide-left-show {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-left-hide {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-100%);
  }
}

@keyframes slide-right-show {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-right-hide {
  0% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes round {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}
